package nc.ui.tools.FunSwitch;

import java.util.ArrayList;

public abstract class FunSwitch {
	protected Object action=null;
	
	protected ArrayList<IFunSwitch> funList=new ArrayList<IFunSwitch>();
	
	public void addFunSwitch(IFunSwitch arg0) {
		funList.add(arg0);
	}
	public void setAction(Object action) {
		this.action=action;
	}
	public void noticeAll() {
		for (int i = 0; i < funList.size(); i++) {
			funList.get(i).update(this, action);
		}
	}
}
